package com.tz.basedemo.basecode.baseUi.activity;

import android.view.View;

import com.tz.basedemo.R;
import com.tz.basedemo.R2;
import com.tz.basedemo.basecode.base.BaseActivity;
import com.tz.basedemo.basecode.view.CountDownView;

import butterknife.BindView;


/**
 * Created by chenjian on 17/12/7.
 */

public class StartActivity extends BaseActivity {

    @BindView(R2.id.countDownView)
    CountDownView countDownView;

    @Override
    protected int getLayoutResId() {
        return R.layout.activity_start;
    }

    @Override
    protected void init() {
        countDownView
                .setCountDownTimerListener(new CountDownView.CountDownTimerListener() {
                    @Override
                    public void onStartCount() {
                    }

                    @Override
                    public void onFinishCount() {
                        switchActivity(DameActivity.class,null);
                        countDownView.finishTime();
                        finish();
                    }
                });

        countDownView.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                switchActivity(DameActivity.class,null);
                countDownView.finishTime();
                finish();
            }
        });

    }

    @Override
    protected void initTitle() {

    }

}

